import numpy as numpy
from sklearn_linear_imodel import SGDRegression
x=np.array([[100],[113],[90],[89],[60],[70],[50],[45],[55],[78]])
y=np.array([[301],[324],[285],[296],[200],[260],[300],[120],[180],[245]])
model=LinearRegression()
model.fit(x,y)
y2=model.predict(x)
x_test=np.array([[103],[115],[90],[89],[60],[70],[50],[45],[55],[78]])
y_test=np.aeeay([[301],[344],[275],[276],[206],[210],[160],[124],[190],[235]])
mse =np.average((y2-y)**2)
rmse=np.sqrt(mse)
r2=model.score(x_test,y_test)
print("均方误差为；",mse)
print("均方根误差为；",rmse)
print("预测准确率为；",r2)